/*fonction to follow someone*/
$(document).ready(function() {
	$(".follow").click(function(e){
		e.preventDefault();
		var that = $(this);
		var id = $(this).attr('id');
		if (confirm('Follow Realy ?')) {
			var url =  'follow.php?id=' + id;
			$.get(url, function(data, textStatus){
					$('.follow').hide();
					$('.unfollow').toggle();
				});
		}
	});
});

/*fonction to unfollow someone*/
$(document).ready(function() {
	$(".unfollow").click(function(e){
		e.preventDefault();
		var that = $(this);
		var id = $(this).attr('id');
		if (confirm('Unfollow Realy ?')) {
			var url =  'unfollow.php?id=' + id;
			$.get(url, function(data, textStatus){
					$('.unfollow').hide();
					$('.follow').toggle();
				});
		}
	});
});


